﻿#ifndef DATASINGLETON_H
#define DATASINGLETON_H

#include <random>

#include <vsg/io/Options.h>
#include <vsg/utils/Builder.h>

class DataSingleton {
public:

	static DataSingleton* instance() {
		static DataSingleton instace;
		return &instace;
	}

public:
	float h_k{ 0.1f };
	std::mt19937_64 m_gen;
	vsg::ref_ptr<vsg::Builder> m_builder;
	vsg::ref_ptr<vsg::Device> m_device;
private:
	DataSingleton() {
		std::random_device rd;  // 将用于获得随机数引擎的种子
		m_gen = std::mt19937_64(rd()); // 以 rd() 播种的标准 mersenne_twister_engine
		m_builder = vsg::Builder::create();
	};
};

#endif
